import LazyLoad from './lazyLoad'
import PrivateRoute from './PrivateRoute'
import Layout from '../layout'

export const baseRoutes = [
  {
    path : 'login',
    element: LazyLoad('../pages/login/index.jsx')
  },
  {
    path : 'test',
    element: LazyLoad('../pages/test/index.jsx')
  },
  {
    path : '*',
    element: LazyLoad('../pages/redirect/index.jsx')
  }
]

const routes = [
  {
    path : '/',
    element:
      <PrivateRoute>
        <Layout />
      </PrivateRoute>,
    children: []
  },
  ...baseRoutes
]

export default routes